package object;

/**
 * @TODO 1. 计算出生日期至今的天数
 * @Author xu
 * 2025/3/10
 */
  import java.time.temporal.ChronoUnit;
 import java.time.LocalDate;
public class LocalDate01 {
    public static void main(String[] args) {

            LocalDate birthDate = LocalDate.of(1990, 1, 1); // 替换为你的出生日期
            LocalDate today = LocalDate.now();

            long daysSinceBirth = ChronoUnit.DAYS.between(birthDate, today);
            System.out.println("从出生日期至今的天数: " + daysSinceBirth + " 天");
        }

    }
